#include <iostream>
#include <vector>

int main()
{
#if 0 // C++14
    auto f = [](auto a, auto b)
    { return a + b; };
    std::cout << f(1, 2) << std::endl;
#endif

#if 1 // C++17
    auto f = [](auto a, auto b)
    { return a + b; };
    std::cout << f(1, 2) << std::endl;

    // 模板自动推导：明确构造函数参数类型
    // std::vector<int> a = {1, 2, 3, 4, 5};
    std::vector a = {1, 2, 3, 4, 5};
    std::pair p = {1, 3.14};

#endif

    return 0;
}